package com.ys.enume.sys;

public class YsRoleEnum {
	
	/*
	 * 权限类型
	 */
	public enum Type {
		ALL("全部权限", 1, "AllData"),
		OPERATOR("运营权限", 2, "DeptData"),
		DEPT("机构权限", 3, "CompanyData"),
		USER("个人权限", 4, "UserData");
		public String name;
		public Integer value;
		public String valueOld;

		private Type(String name, Integer value, String valueOld) {
			this.name = name;
			this.value = value;
			this.valueOld = valueOld;
		}

		public static String getValueOld(Integer value) {
			for (Type e : Type.values()) {
				if (e.value == value) {
					return e.valueOld;
				}
			}

			return "";
		}
	}
}
